<script type="text/javascript" >
    stFacebookToolbox.load_tooltip();
    stFacebookToolbox.on_submitform('#settingForm');
    jQuery("a[rel^='prettyPhoto']").prettyPhoto();

</script>
<div class="w100p bgl">
    <div class="w100p bgr p5b">
<a href="#inline_demo" rel='prettyPhoto'><img src="<?php echo $config['imagesUrl']?>info2.png" style="float:right;margin-top:11px;" /></a>
        <form class="stform" id="settingForm" action="<?php echo admin_url('/admin.php?page=' . $config['plugin_name'] . '&action=' . $current_action) ?>" method="post" >
            <input type="hidden" id="picture" value="<?php echo $plugin_url;?>images/mini-loading.gif" />
                        <div id="facebook_get_fan_list" align="center"></div>
                <p></p>
                <ul>
                      <li style="width:820px;">
                        <label title="Select Facebook Page" ><?php _e('Select Facebook Page', $config['plugin_name'])?></label>
                        <div style="width: 334px;">
                            <select title="Select facebook method" class="input login_input " id="pageid" name="data[pageid]" tabindex="2" style="width:200px;">
                                <?php foreach($result as $row):?>
                                <option value="<?php echo $row->pageid;?>" <?php if($row->pageid == $pageid){echo 'selected';}?>><?php echo $row->pagename;?></option>
                                <?php endforeach;?>
                            </select>&nbsp;<input type="button" value="Get List of Fans" class="button_submit" style="margin-left:0px;color:#FFF;width: 108px;" onclick="stFacebookToolboxcustom.loadPage('get_fan_list&pageid='+jQuery('#pageid').val())"/>
                        </div>
                        
                        <br clear="both" />
                    </li>
                    <?php if(isset($alert)):?>
                    <li>
                        <label title=""  style="width:205px;">&nbsp;</label>
                        <span style="padding:7px 0 0;"><?php echo $alert;?></span>
                        <input type="hidden" name="data[type]" id="type" value="<?php echo $page;?>" />
                    </li>
                    <li>
                         <label title="Page type" style="width:205px;"><?php _e('Page type', $config['plugin_name'])?></label>
                        <span style="padding:7px 0 0;"><?php echo $number;?></span>

                        <br clear="both" />
                    </li>
                    <?php if($over):?>
                    <li>
                        <label title="node_id" ><?php _e('node_id', $config['plugin_name'])?></label>
                        <div>
                          <input title="node_id" value="<?php echo $node_id;?>" class="" name="data[node_id]" id="node_id" type="text" tabindex="4" />
                        </div>

                        <br clear="both" />
                    </li>
                    <li>
                        <label title="post_form_id" ><?php _e('post_form_id', $config['plugin_name'])?></label>
                        <div>
                          <input title="post_form_id" value="<?php echo $post_form_id;?>" class="" name="data[post_form_id]" id="post_form_id" type="text" tabindex="4" />
                        </div>

                        <br clear="both" />
                    </li>
                    <li>
                        <label title="fb_dtsg" ><?php _e('fb_dtsg', $config['plugin_name'])?></label>
                        <div>
                          <input title="fb_dtsg" value="<?php echo $fb_dtsg;?>" class="" name="data[fb_dtsg]" id="fb_dtsg" type="text" tabindex="4" />
                        </div>

                        <br clear="both" />
                    </li>
                    <?php endif;?>
                    <li>
                        <label title="cookie" ><?php _e('cookie', $config['plugin_name'])?></label>
               			<div>
                        	<textarea title="cookie"
                                      class="" name="data[cookie]" cols="5" rows="5"
                                      id="cookie" tabindex="13" ><?php echo $cookie;?></textarea>
						</div>                        <br clear="both" />
                    </li>
                     <li>
                        <label title="get_fan_now" >&nbsp;</label>
               			<div>
                        	<input type="checkbox" value="1" name="data[get_fan_now]" id="get_fan_now" />&nbsp;Get Fan Now
						</div>                        <br clear="both" />
                    </li>
                    <li>
                        <input type="button" value="Submit" onclick="stFacebookToolboxcustom.get_fan_list();" style="color:#FFF;" class="button_submit" />
                    </li>
					<?php endif;?>

                </ul>
        </form>
        <div id="inline_demo" style="display:none;">
                        <span style="color: red; font-weight: bold; font-size: 11pt;">Help</span>
						<p></p>
						<table border="0" cellpadding="0" cellspacing="5" align="center" width="100%">
						<?php foreach($config['help']['get_fan_list'] as $row):?>
						<tr>
							<td style="width:230px;" valign="top">
							<?php echo $row['title'];?><span style="float:right;">:</span>
							</td>
							<td valign="top" style="padding-left:5px;">
								<?php echo $row['help'];?>
							</td>
						</tr>
						<?php endforeach;?>
			
	</table>
	</div>      
    </div>
</div>